﻿using Jbe.Composite.Extensions;
using Jbe.TestSuite.TestDevices.Manager.Applications;
using Jbe.TestSuite.TestDevices.Interface;
using Jbe.TestSuite.TestDevices.Manager.Presentation;
using Microsoft.Practices.Composite.Modularity;

namespace Jbe.TestSuite.TestDevices.Manager
{
    internal class Module : IModule
    {
        private readonly IApplicationContainer container;


        public Module(IApplicationContainer container)
        {
            this.container = container;

            container.RegisterType<ITestDeviceManager, TestDeviceManager>(true);
            container.RegisterType<ITestDevicesView, TestDevicesView>(true);
        }


        public void Initialize()
        {
            container.Resolve<ModuleController>().Initialize();
        }
    }
}
